<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>css精灵</title>
</head>
<style>
    #demo1{
        width: 300px;
        height: 300px;
        background: aqua url(1.png) no-repeat ;
    }
    #demo2{
        width: 300px;
        height: 300px;
        background: rgb(0, 255, 170) url(1.png) no-repeat -300px 0px ;
    }
    #demo3{
        width: 300px;
        height: 300px;
        background: rgb(255, 145, 0) url(1.png) no-repeat -300px -300px ;
    }
</style>
<body>
    <div id="demo1"></div>
    <div id="demo2"></div>
    <div id="demo3"></div>
</body>
</html>